import request from '@/utils/request'
// 公开推荐列表
export function getpublicList(query) {
  return request({
    url: '/work/recommend/list/public',
    method: 'get',
    param: query,
  })
}
// 获取活动列表
export function getRecommendList(query) {
  return request({
    url: `/work/recommend/list`,
    method: 'get',
    params: query,
  })
}
// 获取收藏列表
export function getfavorite(query) {
  return request({
    url: '/work/favorite/list',
    method: 'get',
    params: query,
  })
}
// 获取关注列表
export function getfollow(query) {
  return request({
    url: '/work/follow/list',
    method: 'get',
    params: query,
  })
}
// 手机号密码登录
export function loginPhone(data) {
  return request({
    url: '/auth/phone/login',
    method: 'post',
    data: data,
  })
}
// 注册手机号
export function register(data) {
  return request({
    url: '/auth/phone/register',
    method: 'post',
    data: data,
  })
}
// 忘记密码
export function resetPhone(data) {
  return request({
    url: '/auth/password/reset',
    method: 'post',
    data: data,
  })
}
// 发送手机验证码
export function sendYzm(data) {
  return request({
    url: '/sms/send',
    method: 'post',
    data: data,
  })
}
// 验证短信手机验证码
export function verifyYzm(data) {
  return request({
    url: '/sms/verify',
    method: 'post',
    data: data,
  })
}
// 手机号登录接口
export function login(data) {
  return request({
    url: `/auth/phone/login`,
    method: 'post',
    data: data,
  })
}
// 微信授权回调
export function welogin(data) {
  return request({
    url: '/auth/wechat/login',
    method: 'post',
    data: data,
  })
}
export function getStatus(query) {
  return request({
    url: `/auth/wechat/login/status?state=${query}`,
    method: 'get',
  })
}
// 作品点赞接口
export function workLike(data) {
  return request({
    url: '/work/like',
    method: 'post',
    data: data,
  })
}
// 作品收藏接口
export function workfavorite(data) {
  return request({
    url: '/work/favorite',
    method: 'post',
    data: data,
  })
}
// 点关注
export function workfollow(data) {
  return request({
    url: '/user/follow',
    method: 'post',
    data: data,
  })
}
// 获取评论列表
export function getCommenlist(data) {
  return request({
    url: '/work/comments/list',
    method: 'post',
    data: data,
  })
}
// 获取子评论列表
export function getsubcomments(data) {
  return request({
    url: '/work/subcomments/list',
    method: 'post',
    data: data,
  })
}
// 发表评论
export function sendcomments(data) {
  return request({
    url: '/work/comments',
    method: 'post',
    data: data,
  })
}
